/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 任务表单样式 */
.task-form {
    display: flex;
    margin-bottom: 20px;
}

#taskInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#taskInput:focus {
    border-color: #3498db;
}

#addTaskBtn {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

#addTaskBtn:hover {
    background-color: #2980b9;
}

/* 筛选按钮样式 */
.filter-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #ecf0f1;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
}

.filter-btn:hover:not(.active) {
    background-color: #d5dbdb;
}

/* 任务列表样式 */
.task-list {
    margin-bottom: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: all 0.3s;
    border-left: 4px solid #3498db;
}

.task-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.task-item.completed {
    opacity: 0.7;
    border-left-color: #2ecc71;
}

.task-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 1rem;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #7f8c8d;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.edit-btn {
    color: #f39c12;
}

.edit-btn:hover {
    background-color: rgba(243, 156, 18, 0.1);
}

.delete-btn {
    color: #e74c3c;
}

.delete-btn:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* 任务统计样式 */
.task-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #e1e8ed;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.empty-state p {
    margin-top: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .task-form {
        flex-direction: column;
    }
    
    #taskInput {
        border-radius: 5px;
        margin-bottom: 10px;
    }
    
    #addTaskBtn {
        border-radius: 5px;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .task-stats {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}